package com.frogs.ucenter.service.daoimpl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.frogs.framework.base.dao.BaseDao;
import com.frogs.framework.base.service.daoimpl.BaseServiceImpl;
import com.frogs.framework.util.PageList;
import com.frogs.ucenter.dao.UserRechargeRecordDao;
import com.frogs.ucenter.entity.UserRechargeRecord;
import com.frogs.ucenter.entity.UserRechargeRecordWithUser;
import com.frogs.ucenter.service.UserRechargeRecordService;

@Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class) 
@Service("userRechargeRecordService")
public class UserRechargeRecordServiceImpl extends BaseServiceImpl<UserRechargeRecord> implements UserRechargeRecordService {
    @Autowired
    private UserRechargeRecordDao userRechargeRecordDao;

    public UserRechargeRecordServiceImpl() {
        super();
    }

    public UserRechargeRecordDao getUserRechargeRecordDao() {
        return userRechargeRecordDao;
    }

    /**
     * Don't remove or edit it.
     */
    @Override
    protected BaseDao<UserRechargeRecord> getBaseDao() {
        return userRechargeRecordDao;
    }

    public void setUserRechargeRecordDao(UserRechargeRecordDao userRechargeRecordDao) {
        this.userRechargeRecordDao = userRechargeRecordDao;
    }
    
    @Override
	public PageList<UserRechargeRecordWithUser> listRecharge(
			Map<String, Object> params, int pageNo, int pageSize) {
		return userRechargeRecordDao.selectUserRescharge(params, pageNo, pageSize);
	}
}